package com.fyh.feign.fallback;

import com.fyh.constant.MessageConstant;
import com.fyh.entity.common.Result;
import com.fyh.entity.job.DeliveryRecord;
import com.fyh.entity.user.SimpleCandidate;
import com.fyh.feign.EmployerUserFeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Component
public class EmployerUserFeignClientFallback implements EmployerUserFeignClient {

    @Override
    public Result<String> getNickname(Long id) {
        System.out.println(MessageConstant.GET_NAME_FAILED);
        throw new RuntimeException(MessageConstant.GET_NAME_FAILED);
    }

    @Override
    public Result<List<SimpleCandidate>> getSimpleCandidateList(List<DeliveryRecord> deliveryRecordList) {
        System.out.println(MessageConstant.GET_CANDIDATE_LIST_FAILED);
        throw new RuntimeException(MessageConstant.GET_CANDIDATE_LIST_FAILED);
    }

    @Override
    public Result<SimpleCandidate> getSimpleCandidate(Long userId) {
        System.out.println(MessageConstant.GET_CANDIDATE_FAILED);
        throw new RuntimeException(MessageConstant.GET_CANDIDATE_FAILED);
    }
}
